The surplus with the US is a major source of anger within the Trump administration, which imposed tariffs on hundreds of billions of dollars worth of Chinese goods last year and has warned of more to come.
Despite the levies, exports to the United States grew 11.3 percent last year while imports rose 0.7 percent, expanding the surplus to a record $323.3 billion from $275.8 billion in 2017, customs data show.
However, in a sign that the White House's measures are having an impact, China's exports to the US sank last month. The figures come after a US delegation held three days of talks in Beijing last week in the first face-to-face meeting since Donald Trump and Chinese leader Xi Jinping in December pledged a 90-day truce to resolve the crisis.
Trump wants Beijing to buy more American goods to narrow the yawning trade gap and allow foreign players better access and protection in the Chinese market.
China traditionally imports vast quantities of American soybeans in the second half of the year, long making it the most valuable import from the US.
But the buying fell off last year after China imposed a 25 percent retaliatory tariff on the commodity in the summer. Total imports of soybeans fell 7.9 percent last year to 88 million tonnes, customs data showed, with December imports down 40.1 percent from a year earlier. "The overall development of China-US trade in 2018 was still relatively normal, but the trade surplus did expand slightly," said Li Kuiwen, spokesman for the customs administration.
The country's commerce minister told state media on Friday that China will work to straighten out trade frictions with the US this year. China's exports to the world fell 4.4 percent in December from a year earlier, while imports dropped 7.6 percent, reflecting sluggish demand at home and abroad.
"With global growth set to cool further this year, exports will remain weak even if China can clinch a trade deal that rows back Trump's tariffs," said Julian Evans-Pritchard of Capital Economics.
The trade slowdown sent Chinese stocks lower on Monday. Rapidly falling exports could point to rising unemployment, said Nomura economist Lu Ting. "Beijing will perhaps be more eager to strike a trade deal with the US ... policymakers will need to take more aggressive measures to stabilise GDP growth," Lu wrote in a note.
China's global trade volume rose last year but its surplus with the world fell 16.2 percent to $351.76 billion in 2018, as imports rose 15.8 percent while exports gained 9.9 percent.
The customs administration will work to "improve the country's business environment and expand foreign trade... in order to keep employment, the financial sector, foreign trade, foreign investment" stable, Li said, adding there are some "hidden concerns" and "uncertain external factors" for development. With US tariffs in place, the gloomy export picture has reinforced the need for Beijing to rely on its legion of consumers to grow its economy.
But a slew of bad data has added to concerns about China's economy, which is expected to have grown around 6.5 percent in 2018, down from 6.9 percent in 2017 and at its weakest rate in almost three decades.
China's annual passenger car sales fell last year for the first time in more than 20 years, as the trade war with the US rocked consumer confidence and Beijing reined in car financing channels.
The cost of producing goods in China's factories slowed sharply in December, a sign demand remains weak, while consumer inflation also flagged.
Official data showed the manufacturing sector contracted in December for the first time in more than two years. China-N Korea trade battered by UN sanctions China's trade with North Korea plummeted last year, data showed Monday, as harsh UN sanctions batter the nuclear-armed country's economy.
Beijing is a key ally of the isolated state and its main source of trade and aid - but in 2017 it backed United Nations measures to punish Pyongyang over its nuclear and ballistic missile activities.
The sanctions on trade in North Korea's most valuable commodities sent bilateral trade plunging 52.4 percent last year compared to 2017.
China's imports from its neighbour dropped 88 percent in 2018 year-on-year to 1.42 billion yuan ($210 million), while its exports slumped 33.3 percent to 14.7 billion yuan ($2.18 billion), according to customs administration spokesman Li Kuiwen.
"For trade between China and North Korea, we are strictly implementing the resolutions of the (UN) Security Council," Li told reporters.
The trade sanctions seek to cut off the North's access to hard currency by banning its main exports - coal and other mineral resources, fisheries and textile products.
They have pummelled the country's economy, which contracted 3.5 percent in 2017 - its worst showing in two decades - South Korea's central bank said last year.
The North's mining industry slumped 11 percent in 2017, the Bank of Korea said, after growing 8.4 percent in 2016.
Manufacturing output also fell 6.9 percent that year - down from 4.8 percent growth - while agriculture and fisheries slipped 1.3 percent, after also expanding in 2016.
China and Russia have both said the UN should consider relaxing sanctions on Pyongyang, while Washington is demanding the North give up its nuclear arsenal before any relief from sanctions is granted.
Last week North Korean strongman Kim Jong Un made his fourth visit to China, with Chinese President Xi Jinping backing him in the deadlocked nuclear talks with the US while insisting the two sides should meet "halfway".